package com.baizhi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

/**
 * 用户(User)表实体类
 *
 * @author makejava
 * @since 2021-09-26 00:06:57
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("user")
@SuppressWarnings("serial")
public class User extends Model<User> {

    @TableId(type = IdType.AUTO, value = "id")
    private Integer id;
    /**
     * 用户名
     */
    @TableField("name")
    private String name;
    /**
     * 头像链接
     */
    @TableField("avatar")
    private String avatar;
    /**
     * 简介
     */
    @TableField("intro")
    private String intro = null;
    /**
     * 手机号
     */
    @TableField("phone")
    private String phone;
    /**
     * 是否绑定手机号
     */
    @TableField("phone_linked")
    private Integer phoneLinked = 1;
    /**
     * 微信openid
     */
    @TableField("openid")
    private String openid;
    /**
     * 是否绑定微信
     */
    @TableField("wechat_linked")
    private Integer wechatLinked = 0;
    /**
     * 关注数
     */
    @TableField("following_count")
    private Integer followingCount;
    /**
     * 粉丝数
     */
    @TableField("followers_count")
    private Integer followersCount;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("created_at")
    private Date createdAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("updated_at")
    private Date updatedAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("deleted_at")
    private Date deletedAt;
}

